package com.xc.xcmanage.web.controller;

import com.xc.xcmanage.domain.dto.LoginBody;
import com.xc.xcmanage.service.SysUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "登录相关接口")
@RestController
public class LoginController {

    @Autowired
    private SysUserService sysUserService;

    @ApiOperation("登录")
    @PostMapping("/user/login")
    public Object login(@ApiParam("登录参数") @RequestBody LoginBody loginBody){

        return sysUserService.login(loginBody);
    }
}
